use sysinfo::{System, SystemExt, Cpu, CpuExt, CpuRefreshKind, ComponentExt};
use std::{thread, time};

fn main() {
    println!("Hello, world!");
    let mut sys = System::new_all();

    sys.refresh_all();

    for disk in sys.disks() {
        println!("disk: {:?}", disk);
    }


    sys.refresh_cpu_specifics(CpuRefreshKind::everything().without_frequency());
    for cpu in sys.cpus() {
        println!("usage: {:?}", cpu.cpu_usage());
    }

    let components = sys.components();
    for comp in components {
        println!("component: {:?}", comp.temperature());
    }
}
